#ifndef DX11TEXTUREMANAGER_H
#define DX11TEXTUREMANAGER_H

#include "Singleton.h"

#include <string>
#include <map>
#include <d3d11.h>
#include <dxgi.h>

typedef std::map<std::wstring, ID3D11ShaderResourceView*> TextureMap;

class DX11TextureManager : public Uncopyable
{
	DX11TextureManager();
	friend class Singleton<DX11TextureManager>;
public:
	void Initialise();

	bool LoadTexture(const std::wstring& fileName);
	ID3D11ShaderResourceView*& UseTexture(const std::wstring& texTag);

	ID3D11SamplerState* UseDefaultSamplerState() const;

private:
	TextureMap m_textures;
	ID3D11SamplerState* m_pDefaultSamplerState;
};

typedef Singleton<DX11TextureManager> TheDX11TextureManager;

#endif //DX11TEXTUREMANAGER_H